#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtGui/QMainWindow>
#include <QCheckBox>
#include <QLine>
#include <QPainter>
#include <QFrame>
#include <QLabel>
#include <QSignalMapper>
namespace Ui
{
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void drownHline(int n,QFrame **frame,int x,int y,int weight,int height,int distance);
    void drow4CheckBox(QCheckBox *checkbox[4],int x,int y,int weight,int height,int distance);
    void drow4Word(QLabel *label[4],int x,int y,int weight,int height,int distance);
    void drow3Image(QLabel *label[4],int x,int y,int weight,int height,int distance);
    void drowNCheckBox(int n,QCheckBox **checkbox,int x,int y,int weight,int height,int distance, int delta=0);

private:
    Ui::MainWindow *ui;

    int xM1;
    int yM1;
    int Vd;
    int Hd;
    int XConLine;
    int YConLine;
    int WConLine;
    int HConLine;

    QCheckBox *box[4];
    QCheckBox *boxm1[12];
    //QCheckBox *boxm2[4];
    //QCheckBox *boxm3[4];
    QFrame *f[4];
    QFrame *fbus[2];
    QFrame *f1[4];
    QFrame *fm1[4];
    QFrame *fm2[4];
    QFrame *fm3[4];
    QLabel *linp[4];
    QLabel *lm1[4];
    QLabel *lm2[4];
    QLabel *lm3[4];
    QFrame *fme1[4];
    QFrame *fme2[4];
    QFrame *fme3[4];
    QImage *im;
    QLabel *lim[3];
    QFrame *f_A[3];
    QFrame *fVConl[3];
    QFrame *fHConl[3];
    QSignalMapper *boxMapper;
    QSignalMapper *box1Mapper;
    QImage *imConLine;
    QLabel *LConLine;
    QFrame *f_con[8];
    QFrame *f_B[4];

    bool box1Flag;
    bool box2Flag;
    bool box3Flag;
public slots:
    void changeBoxLineColor(int i);
    void changeBox1LineColor(int i);


};

#endif // MAINWINDOW_H
